namespace ext.data
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>DataWriter extension for writing an array or single {@link Ext.data.Record} object(s) in preparation for executing a remote CRUD action.</summary>
	/// <definedin>src\data\JsonWriter.js</definedin>
	[ScriptName("JsonWriter")]
	[ScriptNamespace("Ext.data")]
	[Imported()]
	public partial class JsonWriter : ext.data.DataWriter
	{
		
		#region Constructors
		public JsonWriter(ext.data.JsonWriter_Configuration config)
		{
		}
		
		/// <summary>Constructor</summary>
		public JsonWriter()
		{
		}
		#endregion
		
		#region Fields
		/// <summary>
		/// true to {@link Ext.util.JSON#encode JSON encode} the
		/// {@link Ext.data.DataWriter#toHash hashed data} into a standard HTTP parameter named after this
		/// Reader&apos;s meta.root property which, by default is imported from the associated Reader. Defaults to true.  If set to false, the hashed data is {@link Ext.util.JSON#encode JSON encoded}, along with
		/// the associated {@link Ext.data.Store}&apos;s {@link Ext.data.Store#baseParams baseParams}, into the POST body.  When using {@link Ext.data.DirectProxy}, set this to false since Ext.Direct.JsonProvider will perform
		/// its own json-encoding. In addition, if you&apos;re using {@link Ext.data.HttpProxy}, setting to false
		/// will cause HttpProxy to transmit data using the jsonData configuration-params of {@link Ext.Ajax#request}
		/// instead of params.  When using a {@link Ext.data.Store#restful} Store, some serverside frameworks are
		/// tuned to expect data through the jsonData mechanism. In those cases, one will want to set encode: false, as in
		/// let the lower-level...
		/// </summary>
		/// <htmlSummary>
		/// &lt;p&gt;&lt;tt&gt;true&lt;/tt&gt; to {@link Ext.util.JSON#encode JSON encode} the
		/// {@link Ext.data.DataWriter#toHash hashed data} into a standard HTTP parameter named after this
		/// Reader&apos;s &lt;code&gt;meta.root&lt;/code&gt; property which, by default is imported from the associated Reader. Defaults to &lt;tt&gt;true&lt;/tt&gt;.&lt;/p&gt;
		/// &lt;p&gt;If set to &lt;code&gt;false&lt;/code&gt;, the hashed data is {@link Ext.util.JSON#encode JSON encoded}, along with
		/// the associated {@link Ext.data.Store}&apos;s {@link Ext.data.Store#baseParams baseParams}, into the POST body.&lt;/p&gt;
		/// &lt;p&gt;When using {@link Ext.data.DirectProxy}, set this to &lt;tt&gt;false&lt;/tt&gt; since Ext.Direct.JsonProvider will perform
		/// its own json-encoding. In addition, if you&apos;re using {@link Ext.data.HttpProxy}, setting to &lt;tt&gt;false&lt;/tt&gt;
		/// will cause HttpProxy to transmit data using the &lt;b&gt;jsonData&lt;/b&gt; configuration-params of {@link Ext.Ajax#request}
		/// instead of &lt;b&gt;params&lt;/b&gt;.&lt;/p&gt;
		/// &lt;p&gt;When using a {@link Ext.data.Store#restful} Store, some serverside frameworks are
		/// tuned to expect data through the jsonData mechanism. In those cases, one will want to set &lt;b&gt;encode: &lt;tt&gt;false&lt;/tt&gt;&lt;/b&gt;, as in
		/// let the lower-level connection object (eg: Ext.Ajax) do the encoding.&lt;/p&gt;
		/// </htmlSummary>
		/// <definedin>src\data\JsonWriter.js</definedin>
		[ScriptName("encode")]
		public bool Encode;
		
		/// <summary>
		/// False to send only the id to the server on delete, true to encode it in an object
		/// literal, eg:  
		/// {id: 1}
		///  Defaults to false
		/// </summary>
		/// <htmlSummary>
		/// False to send only the id to the server on delete, true to encode it in an object
		/// literal, eg: &lt;pre&gt;&lt;code&gt;
		/// {id: 1}
		/// &lt;/code&gt;&lt;/pre&gt; Defaults to &lt;tt&gt;false&lt;/tt&gt;
		/// </htmlSummary>
		/// <definedin>src\data\JsonWriter.js</definedin>
		[ScriptName("encodeDelete")]
		public bool EncodeDelete;
		#endregion
		
		#region Methods
		/// <summary>Implements abstract Ext.data.DataWriter#createRecord</summary>
		/// <definedin>src\data\JsonWriter.js</definedin>
		/// <param name="rec"></param>
		[ScriptName("createRecord")]
		public object CreateRecord(ext.data.RecordClass rec)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Implements abstract Ext.data.DataWriter#updateRecord</summary>
		/// <definedin>src\data\JsonWriter.js</definedin>
		/// <param name="rec"></param>
		[ScriptName("updateRecord")]
		public object UpdateRecord(ext.data.RecordClass rec)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Implements abstract Ext.data.DataWriter#destroyRecord</summary>
		/// <definedin>src\data\JsonWriter.js</definedin>
		/// <param name="rec"></param>
		[ScriptName("destroyRecord")]
		public object DestroyRecord(ext.data.RecordClass rec)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// This method should not need to be called by application code, however it may be useful on occasion to
		/// override it, or augment it with an {@link Function#createInterceptor interceptor} or {@link Function#createSequence sequence}.  The provided implementation encodes the serialized data representing the Store&apos;s modified Records into the Ajax request&apos;s
		/// params according to the {@link #encode} setting.
		/// </summary>
		/// <htmlSummary>
		/// &lt;p&gt;This method should not need to be called by application code, however it may be useful on occasion to
		/// override it, or augment it with an {@link Function#createInterceptor interceptor} or {@link Function#createSequence sequence}.&lt;/p&gt;
		/// &lt;p&gt;The provided implementation encodes the serialized data representing the Store&apos;s modified Records into the Ajax request&apos;s
		/// &lt;code&gt;params&lt;/code&gt; according to the &lt;code&gt;{@link #encode}&lt;/code&gt; setting.&lt;/p&gt;
		/// </htmlSummary>
		/// <definedin>src\data\JsonWriter.js</definedin>
		/// <param name="Ajax">request params object to write into.</param>
		/// <param name="baseParams">as defined by {@link Ext.data.Store#baseParams}. The baseParms must be encoded by the extending class, eg: {@link Ext.data.JsonWriter}, {@link Ext.data.XmlWriter}.</param>
		/// <param name="data">
		/// Data object representing the serialized modified records from the Store. May be either a single object,
		/// or an Array of objects - user implementations must handle both cases.
		/// </param>
		[ScriptName("render")]
		public void Render(object Ajax, object baseParams, object data)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// This method should not need to be called by application code, however it may be useful on occasion to
		/// override it, or augment it with an {@link Function#createInterceptor interceptor} or {@link Function#createSequence sequence}.  The provided implementation encodes the serialized data representing the Store&apos;s modified Records into the Ajax request&apos;s
		/// params according to the {@link #encode} setting.
		/// </summary>
		/// <htmlSummary>
		/// &lt;p&gt;This method should not need to be called by application code, however it may be useful on occasion to
		/// override it, or augment it with an {@link Function#createInterceptor interceptor} or {@link Function#createSequence sequence}.&lt;/p&gt;
		/// &lt;p&gt;The provided implementation encodes the serialized data representing the Store&apos;s modified Records into the Ajax request&apos;s
		/// &lt;code&gt;params&lt;/code&gt; according to the &lt;code&gt;{@link #encode}&lt;/code&gt; setting.&lt;/p&gt;
		/// </htmlSummary>
		/// <definedin>src\data\JsonWriter.js</definedin>
		/// <param name="Ajax">request params object to write into.</param>
		/// <param name="baseParams">as defined by {@link Ext.data.Store#baseParams}. The baseParms must be encoded by the extending class, eg: {@link Ext.data.JsonWriter}, {@link Ext.data.XmlWriter}.</param>
		/// <param name="data">
		/// Data object representing the serialized modified records from the Store. May be either a single object,
		/// or an Array of objects - user implementations must handle both cases.
		/// </param>
		[ScriptName("render")]
		public void Render(object Ajax, object baseParams, object[] data)
		{
			throw new System.Exception("Imported - not implemented");
		}
		#endregion
	}
}
